import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import home from '@/components/home/home'
import index from '@/components/main/index'
import user from '@/components/system/user'
import role from '@/components/system/role'
import author from '@/components/system/author'
import system from '@/components/system/system'
import diction from '@/components/dictionary/dict'
import merchant from '@/components/business/merchant'
import coupon from '@/components/business/coupon'
import census from '@/components/statist/census'
import useCoupons from '@/components/statist/useCoupons'
import overdue from '@/components/statist/overdue'
import busistat from '@/components/statist/busistati'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      children: [
      	{
            path: '/index',
            name: 'index',
            component: index
        },
        {
            path: '/user',
            name: 'user',
            component: user
        },
        {
            path: '/role',
            name: 'role',
            component: role
        },
        {
            path: '/author',
            name: 'author',
            component: author
        },
        {
            path: '/system',
            name: 'system',
            component: system
        },
        {
            path: '/dictionary',
            name: 'diction',
            component: diction
        },
        {
            path: '/merch',
            name: 'merchant',
            component: merchant
        },
        {
            path: '/coupon',
            name: 'coupon',
            component: coupon
        },
        {
            path: '/census',
            name: 'census',
            component: census
        },
        {
            path: '/useCoupons',
            name: 'useCoupons',
            component: useCoupons
        },
        {
            path: '/overdue',
            name: 'overdue',
            component: overdue
        },
        {
            path: '/busistat',
            name: 'busistat',
            component: busistat
        },
      ]
    }
  ]
})
